require('./Pagejdzfdetail.less');
import Reflux from 'reflux';
import ReactMixin from 'react-mixin';
import Actions from './Actions'
import Store from './Store';
import { Button,Page, Panel,PanelHeader, PanelBody, PanelFooter,ButtonArea,
  MediaBox,Cells, Cell,CellHeader,MediaBoxTitle,MediaBoxHeader,
  MediaBoxDescription,MediaBoxBody,MediaBoxInfo,MediaBoxInfoMeta,
  CellBody,CellFooter,Toast, Form,FormCell,Radio,Gallery,GalleryDelete,
  Uploader,TextArea,ActionSheet,Flex,FlexItem,SearchBar} from  'react-weui/build/packages'
import {Control} from 'react-keeper';
import zhenggaitongzhi  from './../../../assets/img/整改通知.png';
import xingzhengchufa  from './../../../assets/img/行政处罚.png';
import chengxintongbao  from './../../../assets/img/诚信通报.png';
import tinggongtongzhi  from './../../../assets/img/停工通知.png';


class Jdzfdetail extends React.Component {

  constructor(props) {
    super(props);
  }


  render() {
    return (
      <div>
        <Panel>
          <PanelBody>
            <MediaBox type="appmsg">
              <MediaBoxHeader>
                <img src={zhenggaitongzhi} style={{
                  width:35,
                  height:35,
                  marginTop:15
                }}/>
              </MediaBoxHeader>
              <MediaBoxBody>
                <MediaBoxTitle>
                            <span className="pname" style={{
                              float:"left"
                            }}>{this.state.jdzfdetail.dataDetail.title}</span>
                  <div className="radiusDiv">
                    <span className="rediusPname">市政</span>
                  </div>
                </MediaBoxTitle>
                <MediaBoxDescription>
                  {this.state.jdzfdetail.dataDetail.createTime}
                </MediaBoxDescription>
              </MediaBoxBody>
            </MediaBox>
          </PanelBody>
        </Panel>

        <Panel>
          <PanelBody>
            <div className="csjsarticle">
              <div className="csjsspantitle">
                <span className="csjsdisplayspantitle">编号</span>
              </div>
              <div className="csjsspancontent">
                <span className="csjsdisplayspancontent">ZG000111</span>
              </div>

              <div style={{
                marginTop:16
              }} className="csjsspantitle">
                <span className="csjsdisplayspantitle">地址</span>
              </div>
              <div style={{
                marginTop:16
              }} className="csjsspancontent">
                <span className="csjsdisplayspancontent">宜昌市职业技术学院科技楼</span>
              </div>

              <div style={{
                marginTop:16
              }} className="csjsspantitle">
                <span className="csjsdisplayspantitle">责任主体</span>
              </div>
              <div style={{
                marginTop:16
              }} className="csjsspancontent">
                <span className="csjsdisplayspancontent">城东大道13号路口至
夷陵长江大桥北入口入口入口入口</span>
              </div>

              <div style={{
                marginTop:16
              }} className="csjsspantitle">
                <span className="csjsdisplayspantitle">日期</span>
              </div>
              <div style={{
                marginTop:16
              }} className="csjsspancontent">
                <span className="csjsdisplayspancontent">2017-09-11</span>
              </div>

              <div style={{
                marginTop:16
              }} className="csjsspantitle">
                <span className="csjsdisplayspantitle">状态</span>
              </div>
              <div style={{
                marginTop:16
              }} className="csjsspancontent">
                <span className="csjsdisplayspancontent">监督执法</span>
              </div>

              <div style={{
                marginTop:16,
                width:"100%"
              }} className="csjsspantitle">
                <span className="csjsdisplayspantitle">问题描述</span>
              </div>
              <div style={{
                marginTop:16,
                width:"100%"
              }} className="csjsspancontent">
                <p style={{
                  marginLeft:13,
                  fontSize: "14px",
                  fontFamily : 'Arial Normal Arial',
                  fontWeight: 400
                }}>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                  tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                  quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                  consequat. Duis aute</p>
              </div>
            </div>
          </PanelBody>
        </Panel>
      </div>
    );
  }

  componentWillMount() {
    if(Control.state){
      Actions.loadData(Control.state.dataDetail)
    }
  }

  componentDidMount() {

  }

  componentWillReceiveProps(nextProps) {

  }

  shouldComponentUpdate(nextProps, nextState) {
    const thisProps = this.props || {},
      thisState = this.state.jdzfdetail || {};
    if (Object.keys(thisProps).length !== Object.keys(nextProps).length ||
      Object.keys(thisState).length !== Object.keys(nextState).length) {
      return true;
    }

    for (const key in nextProps) {
      if (thisProps[key] !== nextProps[key]) {
        console.log(thisProps[key], nextProps[key]);
        return true;
      }
    }

    for (const key in nextState) {
      if (thisState[key] !== nextState[key]) {
        return true;
      }
    }
    return false;
  }

}

ReactMixin.onClass(Jdzfdetail, Reflux.connect(Store, 'jdzfdetail'));


export default Jdzfdetail ;
